<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8" isELIgnored="false"%>
<%@ include file="/WEB-INF/views/shared/taglib.jsp"%>
<style type="text/css">
.panel-contact{
	padding: 30px;
	background-color: #ECFFFF;
}
</style>
<div class="row" style="margin-top:15px">
	<c:forEach var="contact" items="${contacts}" varStatus="status">
	<div class="col-lg-3 col-md-6">
		<div class="thumbnail  panel-contact" data-id="${contact.id}" >
			<div class="thumb" >
				<img src="${student.avatar }" onerror="javascript:this.src='<c:url value="/images/default_avatar.jpg" />'" alt="暂无照片">
				<div class="caption-overflow" >
					<span>
						<a href="#" class="btn bg-success-400 btn-icon btn-xs" ><i data-id="${contact.id}" class="icon-pencil7"></i></a>
						<a href="#" class="btn bg-success-400 btn-icon btn-xs"> <i data-id="${contact.id}"  class="icon-x"></i></a>
					</span>
				</div>
			</div>
			
	    	<div class="caption text-center">
	    		<h6 class="text-semibold no-margin">${contact.contactName}</h6>
	    		<h7 class="text-semibold no-margin">简介:${contact.comments}</h7>
    			<ul class="icons-list mt-15">
    				<li><a href="#" data-popup="tooltip"  data-container="body"><i class="icon-phone"></i></a>手机:${contact.mobile}</li>          
                </ul>
                <ul class="icons-list mt-15">  			
                   	<li><a href="#" data-popup="tooltip"  data-container="body"><i class="icon-envelop3"></i></a>邮箱:${contact.email}</li>
                </ul>
	    	</div>
    	</div>
	</div>
	</c:forEach>
</div>
<script>
	$('.icon-x').click(function() {
		var id = $(this).attr('data-id');
		
		if(isEditor(id)){
			var url=$.getVirtualPath()+"/admin/user/contact/delete?key="+id;
			deleteDataEx(url,function(data){
				if(data.resultType=="success"){
					formSubmit();
				}
			});
		}
	})

	$('.icon-pencil7').click(function() {
		var id = $(this).attr('data-id');
		
		if(isEditor(id)){
			top.openModal("/admin/user/contact/contactDetailed?key="+id,"contact_form","联系人详情-编辑",800,400);	
		}
	})
</script>

